package indi.zhifa.study2024.nbr.gen.busy.item.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import indi.zhifa.core.mpenhance.entity.annotations.ZfDbService;
import indi.zhifa.core.mpenhance.service.impl.ZfDbServiceImpl;
import indi.zhifa.study2024.nbr.gen.busy.item.mapper.GenItemDefineMapper;
import indi.zhifa.study2024.nbr.gen.busy.item.service.IGenItemDefineDbService;
import indi.zhifa.study2024.nbr.gen.busy.item.entity.GenItemDefineEntity;

/**
 * <p>
 * 商品定义表 服务实现类
 * </p>
 *
 * @author 织法
 * @since 2024-09-16
 */
@ZfDbService(name="ItemDefineEntity")
public class GenItemDefineDbServiceImpl extends ZfDbServiceImpl<GenItemDefineMapper, GenItemDefineEntity> implements IGenItemDefineDbService {

    @Override
    public GenItemDefineEntity findByName(String name) {
        LambdaQueryWrapper<GenItemDefineEntity> queryWrapper = Wrappers.<GenItemDefineEntity>lambdaQuery()
                .eq(GenItemDefineEntity::getName, name);
        return findOne(queryWrapper);
    }
}
